package com.clinic.entity.db;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = Syptom.TABLE)
public class Syptom implements Serializable {

	private static final long serialVersionUID = 8610197180782392797L;
	
	public static final String TABLE = "syptom";
	
	public static final class Columns {
		public static final String SYPTOM_ID = "syptomId";
		public static final String NAME = "name";
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = Columns.SYPTOM_ID)
	private long syptomId;
	
	@Column(name = Columns.NAME)
	private String name;
	
	/*@ManyToMany(mappedBy = "syptoms", cascade=CascadeType.ALL, fetch = FetchType.LAZY)
	private List<Prescription> prescriptions;*/
	
//	@ManyToMany(cascade = {CascadeType.ALL})
//    @JoinTable(name="syptomprescriptiondrug", joinColumns={@JoinColumn(name="SYPTOM_ID")}, inverseJoinColumns={@JoinColumn(name="PRESCRIPTION_ID")})
//    private List<Prescription> prescriptions;
//	
//	@ManyToMany(cascade = {CascadeType.ALL})
//    @JoinTable(name="syptomprescriptiondrug", joinColumns={@JoinColumn(name="SYPTOM_ID")}, inverseJoinColumns={@JoinColumn(name="DRUG_ID")})
//    private List<Drug> drugs;

	public long getSyptomId() {
		return syptomId;
	}

	public void setSyptomId(long syptomId) {
		this.syptomId = syptomId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

//	public List<Prescription> getPrescriptions() {
//		return prescriptions;
//	}
//
//	public void setPrescriptions(List<Prescription> prescriptions) {
//		this.prescriptions = prescriptions;
//	}
//
//	public List<Drug> getDrugs() {
//		return drugs;
//	}
//
//	public void setDrugs(List<Drug> drugs) {
//		this.drugs = drugs;
//	}	
}
